chore: Remove current symlink to Postgres#34454
Conversation
Reason for this previously documented at #34265 (comment).
WalkthroughThe key change involves removing the creation of a symlink that pointed to the current version of PostgreSQL in a Dockerfile, while still focusing on installing necessary packages and setting up the environment. Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
Outside diff range and nitpick comments (6)
deploy/docker/base.dockerfile (6)
Line range hint
17-17: Pin versions in apt-get install to avoid potential inconsistencies.To ensure reproducibility and avoid unexpected changes when packages are updated, it's advisable to pin versions of the packages being installed.
- apt-get install --no-install-recommends --yes supervisor curl nfs-common gnupg wget netcat openssh-client gettext ca-certificates + apt-get install --no-install-recommends --yes supervisor=3.3.5 curl=7.68.0 nfs-common=1.3.4 gnupg=2.2.19 wget=1.20.3 netcat=1.10 openssh-client=1:8.2p1 gettext=0.19.8.1 ca-certificates=20210119
Line range hint
17-17: Set the SHELL option -o pipefail before using pipes in RUN commands.This is a best practice to ensure that errors in a pipeline are not masked. If any command in a pipeline fails, this will cause the entire pipeline to fail, which is critical for detecting errors early.
+ SHELL ["/bin/bash", "-o", "pipefail"]
Line range hint
17-17: Replaceaptwithapt-getfor non-interactive use in scripts.
apt-getis more suitable for use in scripts as it does not have the interactive progress bars and prompts thataptdoes.- apt update + apt-get update
Line range hint
17-17: Ensure that apt-get lists are deleted after package installation.This is a common practice to reduce the image size and remove unnecessary files.
+ && rm -rf /var/lib/apt/lists/*
Line range hint
36-36: Double quote variables to prevent globbing and word splitting.This is important to ensure that the shell does not interpret special characters or spaces in the variable as separate arguments or commands.
- curl --location "https://github.com/adoptium/temurin17-binaries/releases/download/jdk-$version/OpenJDK17U-jdk_$(uname -m | sed s/x86_64/x64/)_linux_hotspot_$(echo $version | tr + _).tar.gz" + curl --location "https://github.com/adoptium/temurin17-binaries/releases/download/jdk-${version}/OpenJDK17U-jdk_$(uname -m | sed 's/x86_64/x64/')_linux_hotspot_$(echo ${version} | tr + _).tar.gz"
Line range hint
17-17: Consistently useSHELLoption-o pipefailacross all RUN commands with pipes.This change ensures that all commands in the pipeline fail if any command fails, which is crucial for error detection.
+ SHELL ["/bin/bash", "-o", "pipefail"]Also applies to: 36-36, 47-47, 53-53
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- deploy/docker/base.dockerfile (1 hunks)
Additional context used
Hadolint
deploy/docker/base.dockerfile
[warning] 17-17: Pin versions in apt get install. Instead of
apt-get install <package>useapt-get install <package>=<version>(DL3008)
[info] 17-17: Delete the apt-get lists after installing something (DL3009)
[warning] 17-17: Set the SHELL option -o pipefail before RUN with a pipe in it. If you are using /bin/sh in an alpine image or if your shell is symlinked to busybox then consider explicitly setting your SHELL to /bin/ash, or disable this check (DL4006)
[warning] 17-17: Do not use apt as it is meant to be a end-user tool, use apt-get or apt-cache instead (DL3027)
[warning] 36-36: Set the SHELL option -o pipefail before RUN with a pipe in it. If you are using /bin/sh in an alpine image or if your shell is symlinked to busybox then consider explicitly setting your SHELL to /bin/ash, or disable this check (DL4006)
[info] 36-36: Double quote to prevent globbing and word splitting. (SC2086)
[warning] 47-47: Set the SHELL option -o pipefail before RUN with a pipe in it. If you are using /bin/sh in an alpine image or if your shell is symlinked to busybox then consider explicitly setting your SHELL to /bin/ash, or disable this check (DL4006)
[warning] 53-53: Set the SHELL option -o pipefail before RUN with a pipe in it. If you are using /bin/sh in an alpine image or if your shell is symlinked to busybox then consider explicitly setting your SHELL to /bin/ash, or disable this check (DL4006)
Reason for this previously documented at appsmithorg#34265 (comment). Cypress tests don' make sense since the only diff is on `base.dockerfile`. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Chores** - Updated Dockerfile to streamline PostgreSQL setup. Removed creation of a symlink to the current version of PostgreSQL. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Reason for this previously documented at #34265 (comment).
Cypress tests don' make sense since the only diff is on
base.dockerfile.Summary by CodeRabbit